<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<META http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../../../style.css" type="text/css" media="screen">
<link rel="stylesheet" href="../../../print.css" type="text/css" media="print">
<meta content="VideoLoader,com.greensock.loading.VideoLoader,PLAY_PROGRESS,VIDEO_BUFFER_EMPTY,VIDEO_BUFFER_FULL,VIDEO_COMPLETE,VIDEO_CUE_POINT,VIDEO_PAUSE,VIDEO_PLAY,autoAdjustBuffer,metaData,autoDetachNetStream,bufferMode,bufferProgress,content,duration,netStream,playProgress,rawContent,stageVideo,videoPaused,videoTime,volume,_seek,addASCuePoint,addEventListener,auditSize,getCuePointTime,gotoVideoCuePoint,gotoVideoTime,pauseVideo,playVideo,removeASCuePoint" name="keywords">
<title>com.greensock.loading.VideoLoader</title>
</head>
<body>
<script type="text/javascript" language="javascript" src="../../../asdoc.js"></script><script type="text/javascript" language="javascript" src="../../../cookies.js"></script><script type="text/javascript" language="javascript">
<!--
				asdocTitle = 'VideoLoader - API Documentation';
				var baseRef = '../../../';
				window.onload = configPage;
			--></script>
<table style="display:none" id="titleTable" cellspacing="0" cellpadding="0" class="titleTable">
<tr>
<td align="left" class="titleTableTitle">API Documentation</td><td align="right" class="titleTableTopNav"><a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../package-summary.html">All&nbsp;Packages</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../all-classes.html')" href="../../../class-summary.html">All&nbsp;Classes</a>&nbsp;|&nbsp;<a onclick="loadClassListFrame('../../../index-list.html')" href="../../../all-index-A.html">Index</a>&nbsp;|&nbsp;<a href="../../../index.html?com/greensock/loading/VideoLoader.html&amp;com/greensock/loading/class-list.html" id="framesLink1">Frames</a><a onclick="parent.location=document.location" href="" style="display:none" id="noFramesLink1">No&nbsp;Frames</a></td><td rowspan="3" align="right" class="titleTableLogo"><img alt="Adobe Logo" title="Adobe Logo" class="logoImage" src="../../../images/logo.jpg"></td>
</tr>
<tr class="titleTableRow2">
<td align="left" id="subTitle" class="titleTableSubTitle">Class&nbsp;VideoLoader</td><td align="right" id="subNav" class="titleTableSubNav"><a href="#propertySummary">Properties</a>&nbsp;| <a href="#methodSummary">Methods</a>&nbsp;| <a href="#eventSummary">Events</a>&nbsp;| <a href="#constantSummary">Constants</a></td>
</tr>
<tr class="titleTableRow3">
<td colspan="2">&nbsp;</td>
</tr>
</table>
<script type="text/javascript" language="javascript">
<!--
if (!isEclipse() || window.name != ECLIPSE_FRAME_NAME) {titleBar_setSubTitle("Class VideoLoader"); titleBar_setSubNav(true,true,false,false,true,false,true,false,false,false,false,false,false,false);}
--></script>
<div class="MainContent">
<table cellspacing="0" cellpadding="0" class="classHeaderTable">
<tr>
<td class="classHeaderTableLabel">Package</td><td><a onclick="javascript:loadClassListFrame('class-list.html')" href="package-detail.html">com.greensock.loading</a></td>
</tr>
<tr>
<td class="classHeaderTableLabel">Class</td><td class="classSignature">public class VideoLoader</td>
</tr>
<tr>
<td class="classHeaderTableLabel">Inheritance</td><td class="inheritanceList">VideoLoader <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> <a href="core/LoaderItem.html">LoaderItem</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> <a href="core/LoaderCore.html">LoaderCore</a> <img class="inheritArrow" alt="Inheritance" title="Inheritance" src="../../../images/inherit-arrow.gif"> flash.events.EventDispatcher</td>
</tr>
</table>
<p></p>
 Loads an FLV, F4V, or MP4 video file using a NetStream and also provides convenient playback methods 
 and properties like <code>pauseVideo(), playVideo(), gotoVideoTime(), bufferProgress, playProgress, volume, 
 duration, videoPaused, metaData, </code> and <code>videoTime</code>. Just like ImageLoader and SWFLoader, 
 VideoLoader's <code>content</code> property refers to a <code>ContentDisplay</code> object (Sprite) that 
 gets created immediately so that you can position/scale/rotate it or add ROLL_OVER/ROLL_OUT/CLICK listeners
 before (or while) the video loads. Use the VideoLoader's <code>content</code> property to get the ContentDisplay 
 Sprite, or use the <code>rawContent</code> property to get the <code>Video</code> object that is used inside the 
 ContentDisplay to display the video. If a <code>container</code> is defined in the <code>vars</code> object, 
 the ContentDisplay will immediately be added to that container).<br /><br />
 
 You don't need to worry about creating a NetConnection, a Video object, attaching the NetStream, or any 
 of the typical hassles. VideoLoader can even scale the video into the area you specify using scaleModes 
 like <code>"stretch", "proportionalInside", "proportionalOutside",</code> and more. A VideoLoader will 
 dispatch useful events like <code>VIDEO_COMPLETE, VIDEO_PAUSE, VIDEO_PLAY, VIDEO_BUFFER_FULL, 
 VIDEO_BUFFER_EMPTY, NET_STATUS, VIDEO_CUE_POINT</code>, and <code>PLAY_PROGRESS</code> in addition 
 to the typical loader events, making it easy to hook up your own control interface. It packs a 
 surprising amount of functionality into a very small amount of kb.<br /><br />
 
 <strong>OPTIONAL VARS PROPERTIES</strong><br />
 The following special properties can be passed into the VideoLoader constructor via its <code>vars</code> 
 parameter which can be either a generic object or a <code><a href="data/VideoLoaderVars.html">VideoLoaderVars</a></code> object:<br />
 <ul>
   <li><strong> name : String</strong> - A name that is used to identify the VideoLoader instance. This name can be fed to the <code>LoaderMax.getLoader()</code> or <code>LoaderMax.getContent()</code> methods or traced at any time. Each loader's name should be unique. If you don't define one, a unique name will be created automatically, like "loader21".</li>
   <li><strong> bufferTime : Number</strong> - The amount of time (in seconds) that should be buffered before the video can begin playing (set <code>autoPlay</code> to <code>false</code> to pause the video initially).</li>
   <li><strong> autoPlay : Boolean</strong> - By default, the video will begin playing as soon as it has been adequately buffered, but to prevent it from playing initially, set <code>autoPlay</code> to <code>false</code>.</li>
   <li><strong> smoothing : Boolean</strong> - When <code>smoothing</code> is <code>true</code> (the default), smoothing will be enabled for the video which typically leads to better scaling results.</li>
   <li><strong> container : DisplayObjectContainer</strong> - A DisplayObjectContainer into which the <code>ContentDisplay</code> should be added immediately.</li>
   <li><strong> width : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>width</code> property (applied before rotation, scaleX, and scaleY).</li>
   <li><strong> height : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>height</code> property (applied before rotation, scaleX, and scaleY).</li>
   <li><strong> centerRegistration : Boolean </strong> - if <code>true</code>, the registration point will be placed in the center of the <code>ContentDisplay</code> which can be useful if, for example, you want to animate its scale and have it grow/shrink from its center.</li>
   <li><strong> scaleMode : String </strong> - When a <code>width</code> and <code>height</code> are defined, the <code>scaleMode</code> controls how the video will be scaled to fit the area. The following values are recognized (you may use the <code>com.greensock.layout.ScaleMode</code> constants if you prefer):
    <ul>
     <li><code>"stretch"</code> (the default) - The video will fill the width/height exactly.</li>
     <li><code>"proportionalInside"</code> - The video will be scaled proportionally to fit inside the area defined by the width/height</li>
     <li><code>"proportionalOutside"</code> - The video will be scaled proportionally to completely fill the area, allowing portions of it to exceed the bounds defined by the width/height.</li>
     <li><code>"widthOnly"</code> - Only the width of the video will be adjusted to fit.</li>
     <li><code>"heightOnly"</code> - Only the height of the video will be adjusted to fit.</li>
     <li><code>"none"</code> - No scaling of the video will occur.</li>
    </ul></li>
   <li><strong> hAlign : String </strong> - When a <code>width</code> and <code>height</code> are defined, the <code>hAlign</code> determines how the video is horizontally aligned within that area. The following values are recognized (you may use the <code>com.greensock.layout.AlignMode</code> constants if you prefer):
    <ul>
     <li><code>"center"</code> (the default) - The video will be centered horizontally in the area</li>
     <li><code>"left"</code> - The video will be aligned with the left side of the area</li>
     <li><code>"right"</code> - The video will be aligned with the right side of the area</li>
    </ul></li>
   <li><strong> vAlign : String </strong> - When a <code>width</code> and <code>height</code> are defined, the <code>vAlign</code> determines how the video is vertically aligned within that area. The following values are recognized (you may use the <code>com.greensock.layout.AlignMode</code> constants if you prefer):
    <ul>
     <li><code>"center"</code> (the default) - The video will be centered vertically in the area</li>
     <li><code>"top"</code> - The video will be aligned with the top of the area</li>
     <li><code>"bottom"</code> - The video will be aligned with the bottom of the area</li>
    </ul></li>
   <li><strong> crop : Boolean</strong> - When a <code>width</code> and <code>height</code> are defined, setting <code>crop</code> to <code>true</code> will cause the video to be cropped within that area (by applying a <code>scrollRect</code> for maximum performance). This is typically useful when the <code>scaleMode</code> is <code>"proportionalOutside"</code> or <code>"none"</code> so that any parts of the video that exceed the dimensions defined by <code>width</code> and <code>height</code> are visually chopped off. Use the <code>hAlign</code> and <code>vAlign</code> special properties to control the vertical and horizontal alignment within the cropped area.</li>
   <li><strong> x : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>x</code> property (for positioning on the stage).</li>
   <li><strong> y : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>y</code> property (for positioning on the stage).</li>
   <li><strong> scaleX : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>scaleX</code> property.</li>
   <li><strong> scaleY : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>scaleY</code> property.</li>
   <li><strong> rotation : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>rotation</code> property.</li>
   <li><strong> alpha : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>alpha</code> property.</li>
   <li><strong> visible : Boolean</strong> - Sets the <code>ContentDisplay</code>'s <code>visible</code> property.</li>
   <li><strong> blendMode : String</strong> - Sets the <code>ContentDisplay</code>'s <code>blendMode</code> property.</li>
   <li><strong> bgColor : uint </strong> - When a <code>width</code> and <code>height</code> are defined, a rectangle will be drawn inside the <code>ContentDisplay</code> immediately in order to ease the development process. It is transparent by default, but you may define a <code>bgAlpha</code> if you prefer.</li>
   <li><strong> bgAlpha : Number </strong> - Controls the alpha of the rectangle that is drawn when a <code>width</code> and <code>height</code> are defined.</li>
   <li><strong> volume : Number</strong> - A value between 0 and 1 indicating the volume at which the video should play (default is 1).</li>
   <li><strong> repeat : int</strong> - Number of times that the video should repeat. To repeat indefinitely, use -1. Default is 0.</li>
   <li><strong> stageVideo : StageVideo</strong> - By default, the NetStream gets attached to a <code>Video</code> object, but if you want to use StageVideo in Flash, you can define the <code>stageVideo</code> property and VideoLoader will attach its NetStream to that StageVideo instance instead of the regular Video instance (which is the <code>rawContent</code>). Please read Adobe's docs regarding StageVideo to understand the benefits, tradeoffs and limitations.</li>
   <li><strong> checkPolicyFile : Boolean</strong> - If <code>true</code>, the VideoLoader will check for a crossdomain.xml file on the remote host (only useful when loading videos from other domains - see Adobe's docs for details about NetStream's <code>checkPolicyFile</code> property). </li>
   <li><strong> estimatedDuration : Number</strong> - Estimated duration of the video in seconds. VideoLoader will only use this value until it receives the necessary metaData from the video in order to accurately determine the video's duration. You do not need to specify an <code>estimatedDuration</code>, but doing so can help make the playProgress and some other values more accurate (until the metaData has loaded). It can also make the <code>progress/bytesLoaded/bytesTotal</code> more accurate when a <code>estimatedDuration</code> is defined, particularly in <code>bufferMode</code>.</li>
   <li><strong> deblocking : int</strong> - Indicates the type of filter applied to decoded video as part of post-processing. The default value is 0, which lets the video compressor apply a deblocking filter as needed. See Adobe's <code>flash.media.Video</code> class docs for details.</li>
   <li><strong> bufferMode : Boolean </strong> - When <code>true</code>, the loader will report its progress only in terms of the video's buffer which can be very convenient if, for example, you want to display loading progress for the video's buffer or tuck it into a LoaderMax with other loaders and allow the LoaderMax to dispatch its <code>COMPLETE</code> event when the buffer is full instead of waiting for the whole file to download. When <code>bufferMode</code> is <code>true</code>, the VideoLoader will dispatch its <code>COMPLETE</code> event when the buffer is full as opposed to waiting for the entire video to load. You can toggle the <code>bufferMode</code> anytime. Please read the full <code>bufferMode</code> property ASDoc description below for details about how it affects things like <code>bytesTotal</code>.</li>
   <li><strong> autoAdjustBuffer : Boolean </strong> If the buffer becomes empty during playback and <code>autoAdjustBuffer</code> is <code>true</code> (the default), it will automatically attempt to adjust the NetStream's <code>bufferTime</code> based on the rate at which the video has been loading, estimating what it needs to be in order to play the rest of the video without emptying the buffer again. This can prevent the annoying problem of video playback start/stopping/starting/stopping on a system tht doesn't have enough bandwidth to adequately buffer the video. You may also set the <code>bufferTime</code> in the constructor's <code>vars</code> parameter to set the initial value.</li>
   <li><strong> autoDetachNetStream : Boolean</strong> - If <code>true</code>, the NetStream will only be attached to the Video object (the <code>rawContent</code>) when it is in the display list (on the stage). This conserves memory but it can cause a very brief rendering delay when the content is initially added to the stage (often imperceptible). Also, if you add it to the stage when the <code>videoTime</code> is <i>after</i> its last encoded keyframe, it will render at that last keyframe.</li>
   <li><strong> alternateURL : String</strong> - If you define an <code>alternateURL</code>, the loader will initially try to load from its original <code>url</code> and if it fails, it will automatically (and permanently) change the loader's <code>url</code> to the <code>alternateURL</code> and try again. Think of it as a fallback or backup <code>url</code>. It is perfectly acceptable to use the same <code>alternateURL</code> for multiple loaders (maybe a default image for various ImageLoaders for example).</li>
   <li><strong> noCache : Boolean</strong> - If <code>noCache</code> is <code>true</code>, a "gsCacheBusterID" parameter will be appended to the url with a random set of numbers to prevent caching (don't worry, this info is ignored when you <code>getLoader()</code> or <code>getContent()</code> by url and when you're running locally)</li>
   <li><strong> estimatedBytes : uint</strong> - Initially, the loader's <code>bytesTotal</code> is set to the <code>estimatedBytes</code> value (or <code>LoaderMax.defaultEstimatedBytes</code> if one isn't defined). Then, when the loader begins loading and it can accurately determine the bytesTotal, it will do so. Setting <code>estimatedBytes</code> is optional, but the more accurate the value, the more accurate your loaders' overall progress will be initially. If the loader will be inserted into a LoaderMax instance (for queue management), its <code>auditSize</code> feature can attempt to automatically determine the <code>bytesTotal</code> at runtime (there is a slight performance penalty for this, however - see LoaderMax's documentation for details).</li>
   <li><strong> requireWithRoot : DisplayObject</strong> - LoaderMax supports <i>subloading</i>, where an object can be factored into a parent's loading progress. If you want LoaderMax to require this VideoLoader as part of its parent SWFLoader's progress, you must set the <code>requireWithRoot</code> property to your swf's <code>root</code>. For example, <code>var loader:VideoLoader = new VideoLoader("myScript.php", {name:"textData", requireWithRoot:this.root});</code></li>
   <li><strong> allowMalformedURL : Boolean</strong> - Normally, the URL will be parsed and any variables in the query string (like "?name=test&amp;state=il&amp;gender=m") will be placed into a URLVariables object which is added to the URLRequest. This avoids a few bugs in Flash, but if you need to keep the entire URL intact (no parsing into URLVariables), set <code>allowMalformedURL:true</code>. For example, if your URL has duplicate variables in the query string like <code>http://www.greensock.com/?c=S&amp;c=SE&amp;c=SW</code>, it is technically considered a malformed URL and a URLVariables object can't properly contain all the duplicates, so in this case you'd want to set <code>allowMalformedURL</code> to <code>true</code>.</li>
   <li><strong> autoDispose : Boolean</strong> - When <code>autoDispose</code> is <code>true</code>, the loader will be disposed immediately after it completes (it calls the <code>dispose()</code> method internally after dispatching its <code>COMPLETE</code> event). This will remove any listeners that were defined in the vars object (like onComplete, onProgress, onError, onInit). Once a loader is disposed, it can no longer be found with <code>LoaderMax.getLoader()</code> or <code>LoaderMax.getContent()</code> - it is essentially destroyed but its content is not unloaded (you must call <code>unload()</code> or <code>dispose(true)</code> to unload its content). The default <code>autoDispose</code> value is <code>false</code>.
   
   <br /><br />----EVENT HANDLER SHORTCUTS----</li>
   <li><strong> onOpen : Function</strong> - A handler function for <code>LoaderEvent.OPEN</code> events which are dispatched when the loader begins loading. Make sure your onOpen function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>).</li>
   <li><strong> onInit : Function</strong> - A handler function for <code>Event.INIT</code> events which will be called when the video's metaData has been received and the video is placed into the <code>ContentDisplay</code>. The <code>INIT</code> event can be dispatched more than once if the NetStream receives metaData more than once (which occasionally happens, particularly with F4V files - the first time often doesn't include the cuePoints). Make sure your <code>onInit</code> function accepts a single parameter of type <code>Event</code> (flash.events.Event).</li>
   <li><strong> onProgress : Function</strong> - A handler function for <code>LoaderEvent.PROGRESS</code> events which are dispatched whenever the <code>bytesLoaded</code> changes. Make sure your onProgress function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>). You can use the LoaderEvent's <code>target.progress</code> to get the loader's progress value or use its <code>target.bytesLoaded</code> and <code>target.bytesTotal</code>.</li>
   <li><strong> onComplete : Function</strong> - A handler function for <code>LoaderEvent.COMPLETE</code> events which are dispatched when the loader has finished loading successfully. Make sure your onComplete function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>).</li>
   <li><strong> onCancel : Function</strong> - A handler function for <code>LoaderEvent.CANCEL</code> events which are dispatched when loading is aborted due to either a failure or because another loader was prioritized or <code>cancel()</code> was manually called. Make sure your onCancel function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>).</li>
   <li><strong> onError : Function</strong> - A handler function for <code>LoaderEvent.ERROR</code> events which are dispatched whenever the loader experiences an error (typically an IO_ERROR). An error doesn't necessarily mean the loader failed, however - to listen for when a loader fails, use the <code>onFail</code> special property. Make sure your onError function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>).</li>
   <li><strong> onFail : Function</strong> - A handler function for <code>LoaderEvent.FAIL</code> events which are dispatched whenever the loader fails and its <code>status</code> changes to <code>LoaderStatus.FAILED</code>. Make sure your onFail function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>).</li>
   <li><strong> onIOError : Function</strong> - A handler function for <code>LoaderEvent.IO_ERROR</code> events which will also call the onError handler, so you can use that as more of a catch-all whereas <code>onIOError</code> is specifically for LoaderEvent.IO_ERROR events. Make sure your onIOError function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>).</li>
 </ul><br />
 
 <strong>Note:</strong> Using a <code><a href="data/VideoLoaderVars.html">VideoLoaderVars</a></code> instance 
 instead of a generic object to define your <code>vars</code> is a bit more verbose but provides 
 code hinting and improved debugging because it enforces strict data typing. Use whichever one you prefer.<br /><br />
 
 <strong>Note:</strong> To avoid garbage collection issues in the Flash player, the <code>netStream</code> 
 object that VideoLoader employs must get recreated internally anytime the VideoLoader is unloaded or its loading 
 is cancelled, so if you need to directly access the <code>netStream</code>, it is best to do so <strong>after</strong>
 the <code>COMPLETE</code> event has been dispatched. Otherwise, if you store a reference to the VideoLoader's 
 <code>netStream</code> before or during a load and it gets cancelled or unloaded for some reason, it won't reference 
 the one that was used to load the video.<br /><br />
 
 <strong>Note:</strong> There is a bug/inconsistency in Adobe's NetStream class that causes relative URLs 
 to use the swf's location as the base path instead of the HTML page's location like all other loaders. Therefore,
 it would be wise to use the "base" attribute of the &lt;OBJECT&gt; and &lt;EMBED&gt; tags in the HTML to 
 make sure all relative paths are consistent. See <a href="http://kb2.adobe.com/cps/041/tn_04157.html" target="_blank">http://kb2.adobe.com/cps/041/tn_04157.html</a>
 for details.<br /><br />
 
 <strong>Note:</strong> In order to minimize memory usage, VideoLoader doesn't attach the NetStream to its Video
 object (the <code>rawContent</code>) until it is added to the display list. Therefore, if your VideoLoader's content
 isn't somewhere on the stage, the NetStream's visual content won't be fully decoded into memory (that's a good thing). 
 The only time this could be of consequence is if you are trying to do a BitmapData.draw() of the VideoLoader's content 
 or rawContent when it isn't on the stage. In that case, you'd just need to attach the NetStream manually before doing 
 your BitmapData.draw() like <code>myVideoLoader.rawContent.attachNetStream(myVideoLoader.netStream)</code>. <br /><br />
 
 <p></p>
<br>
<span class="label">Example</span>
<br>Example AS3 code:<div class='listing'><pre>
 import com.greensock.loading.*;
 import com.greensock.loading.display.*;
 import com.greensock.*;
 import com.greensock.events.LoaderEvent;
 
//create a VideoLoader
var video:VideoLoader = new VideoLoader("assets/video.flv", {name:"myVideo", container:this, width:400, height:300, scaleMode:"proportionalInside", bgColor:0x000000, autoPlay:false, volume:0, requireWithRoot:this.root, estimatedBytes:75000});

//start loading
video.load();
 
//add a CLICK listener to a button that causes the video to toggle its paused state.
button.addEventListener(MouseEvent.CLICK, togglePause);
function togglePause(event:MouseEvent):void {
    video.videoPaused = !video.videoPaused;
}

//or you could put the VideoLoader into a LoaderMax queue. Create one first...
var queue:LoaderMax = new LoaderMax({name:"mainQueue", onProgress:progressHandler, onComplete:completeHandler, onError:errorHandler});

//append the VideoLoader and several other loaders
queue.append( video );
queue.append( new DataLoader("assets/data.txt", {name:"myText"}) );
queue.append( new ImageLoader("assets/image1.png", {name:"myImage", estimatedBytes:3500}) );

//start loading the LoaderMax queue
queue.load();

function progressHandler(event:LoaderEvent):void {
 trace("progress: " + event.target.progress);
}

function completeHandler(event:LoaderEvent):void {
 //play the video
 video.playVideo();
 
 //tween the volume up to 1 over the course of 2 seconds.
 TweenLite.to(video, 2, {volume:1});
}

function errorHandler(event:LoaderEvent):void {
 trace("error occured with " + event.target + ": " + event.text);
}
 </pre></div>
 
 <b>Copyright 2010-2012, GreenSock. All rights reserved.</b> This work is subject to the terms in <a href="http://www.greensock.com/terms_of_use.html">http://www.greensock.com/terms_of_use.html</a> or for corporate Club GreenSock members, the software agreement that was issued with the corporate membership.
 
 <p></p>
<p>
<span class="classHeaderTableLabel">See also</span>
</p>
<div class="seeAlso">
<a href="data/VideoLoaderVars.html" target="">com.greensock.loading.data.VideoLoaderVars</a>
</div>
<br>
<hr>
</div>
<a name="propertySummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Properties</div>
<div class="showHideLinks">
<div class="hideInheritedProperty" id="hideInheritedProperty">
<a onclick="javascript:setInheritedVisible(false,'Property');" href="#propertySummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Properties</a>
</div>
<div class="showInheritedProperty" id="showInheritedProperty">
<a onclick="javascript:setInheritedVisible(true,'Property');" href="#propertySummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Properties</a>
</div>
</div>
<table id="summaryTableProperty" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Property</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderCore.html#auditedSize">auditedSize</a> : Boolean<div class="summaryTableDescription"> 
   Indicates whether or not the loader's <code>bytesTotal</code> value has been set by any of the following:
   <ul>
     <li>Defining an <code>estimatedBytes</code> in the <code>vars</code> object passed to the constructor</li>
     <li>Calling <code>auditSize()</code> and getting a response (an error is also considered a response)</li>
     <li>When a LoaderMax instance begins loading, it will automatically force a call to <code>auditSize()</code> for any of its children that don't have an <code>estimatedBytes</code> defined.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#autoAdjustBuffer">autoAdjustBuffer</a> : Boolean<div class="summaryTableDescription"> If the buffer becomes empty during playback and <code>autoAdjustBuffer</code> is <code>true</code> (the default), it will automatically attempt to adjust the NetStream's <code>bufferTime</code> based on the rate at which the video has been loading, estimating what it needs to be in order to play the rest of the video without emptying the buffer again.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#autoDetachNetStream">autoDetachNetStream</a> : Boolean<div class="summaryTableDescription"> If <code>true</code> (the default), the NetStream will only be attached to the Video object (the <code>rawContent</code>) when it is in the display list (on the stage).</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderCore.html#autoDispose">autoDispose</a> : Boolean<div class="summaryTableDescription"> When <code>autoDispose</code> is <code>true</code>, the loader will be disposed immediately after it completes (it calls the <code>dispose()</code> method internally after dispatching its <code>COMPLETE</code> event).</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bufferMode">bufferMode</a> : Boolean<div class="summaryTableDescription"> 
   When <code>bufferMode</code> is <code>true</code>, the loader will report its progress only in terms of the 
   video's buffer instead of its overall file loading progress which has the following effects:
   <ul>
     <li>The <code>bytesTotal</code> will be calculated based on the NetStream's <code>duration</code>, <code>bufferLength</code>, and <code>bufferTime</code> meaning it may fluctuate in order to accurately reflect the overall <code>progress</code> ratio.</li> 
     <li>Its <code>COMPLETE</code> event will be dispatched as soon as the buffer is full, so if the VideoLoader is nested in a LoaderMax, the LoaderMax will move on to the next loader in its queue at that point.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#bufferProgress">bufferProgress</a> : Number<div class="summaryTableDescription">[read-only] A value between 0 and 1 describing the progress of the buffer (0 = not buffered at all, 0.5 = halfway buffered, and 1 = fully buffered).</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderCore.html#bytesLoaded">bytesLoaded</a> : uint<div class="summaryTableDescription"> Bytes loaded </div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderCore.html#bytesTotal">bytesTotal</a> : uint<div class="summaryTableDescription"> Total bytes that are to be loaded by the loader.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#content">content</a> : *<div class="summaryTableDescription">[read-only] A ContentDisplay (a Sprite) that contains a Video object to which the NetStream is attached.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#duration">duration</a> : Number<div class="summaryTableDescription">[read-only] The duration (in seconds) of the video.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderItem.html#httpStatus">httpStatus</a> : int<div class="summaryTableDescription"> The httpStatus code of the loader.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderItem.html">LoaderItem</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderCore.html#loadTime">loadTime</a> : Number<div class="summaryTableDescription"> 
   The number of seconds that elapsed between when the loader began and when it either completed, failed, 
   or was canceled.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#metaData">metaData</a> : Object<div class="summaryTableDescription"> The metaData that was received from the video (contains information about its width, height, frame rate, etc.).</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderCore.html#name">name</a> : String<div class="summaryTableDescription"> A name that you use to identify the loader instance.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#netStream">netStream</a> : NetStream<div class="summaryTableDescription">[read-only] The <code>NetStream</code> object used to load the video </div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderCore.html#paused">paused</a> : Boolean<div class="summaryTableDescription"> If a loader is paused, its progress will halt and any LoaderMax instances to which it belongs will either skip over it or stop when its position is reached in the queue (depending on whether or not the LoaderMax's <code>skipPaused</code> property is <code>true</code>).</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#playProgress">playProgress</a> : Number<div class="summaryTableDescription"> A value between 0 and 1 describing the playback progress where 0 means the virtual playhead is at the very beginning of the video, 0.5 means it is at the halfway point and 1 means it is at the end of the video.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderCore.html#progress">progress</a> : Number<div class="summaryTableDescription"> A value between 0 and 1 indicating the overall progress of the loader.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#rawContent">rawContent</a> : Video<div class="summaryTableDescription">[read-only] The <code>Video</code> object to which the NetStream was attached (automatically created by VideoLoader internally) </div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderItem.html#request">request</a> : URLRequest<div class="summaryTableDescription"> The <code>URLRequest</code> associated with the loader.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderItem.html">LoaderItem</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderItem.html#scriptAccessDenied">scriptAccessDenied</a> : Boolean<div class="summaryTableDescription">
   If the loaded content is denied script access (because of security sandbox restrictions,
   a missing crossdomain.xml file, etc.), <code>scriptAccessDenied</code> will be set to <code>true</code>.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderItem.html">LoaderItem</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#stageVideo">stageVideo</a> : Object<div class="summaryTableDescription"> By default, the NetStream gets attached to a <code>Video</code> object, but if you want to use StageVideo in Flash, you can define the <code>stageVideo</code> object and VideoLoader will attach its NetStream to that StageVideo instance instead of the regular Video instance (which is the <code>rawContent</code>).</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderCore.html#status">status</a> : int<div class="summaryTableDescription"> Integer code indicating the loader's status; options are <code>LoaderStatus.READY, LoaderStatus.LOADING, LoaderStatus.COMPLETED, LoaderStatus.PAUSED,</code> and <code>LoaderStatus.DISPOSED</code>.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderItem.html#url">url</a> : String<div class="summaryTableDescription"> The url from which the loader should get its content.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderItem.html">LoaderItem</a></td>
</tr>
<tr class="hideInheritedProperty">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol"><a class="signatureLink" href="core/LoaderCore.html#vars">vars</a> : Object<div class="summaryTableDescription"> An object containing optional configuration details, typically passed through a constructor parameter.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#videoPaused">videoPaused</a> : Boolean<div class="summaryTableDescription"> The playback status of the video: <code>true</code> if the video's playback is paused, <code>false</code> if it isn't.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#videoTime">videoTime</a> : Number<div class="summaryTableDescription"> The time (in seconds) at which the virtual playhead is positioned on the video.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#volume">volume</a> : Number<div class="summaryTableDescription"> The volume of the video (a value between 0 and 1).</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
</table>
</div>
<a name="methodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Methods</div>
<div class="showHideLinks">
<div class="hideInheritedMethod" id="hideInheritedMethod">
<a onclick="javascript:setInheritedVisible(false,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Public Methods</a>
</div>
<div class="showInheritedMethod" id="showInheritedMethod">
<a onclick="javascript:setInheritedVisible(true,'Method');" href="#methodSummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Public Methods</a>
</div>
</div>
<table id="summaryTableMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#VideoLoader()">VideoLoader</a>(urlOrRequest:*, vars:Object = null)</div>
<div class="summaryTableDescription">
   Constructor
   
   </div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addASCuePoint()">addASCuePoint</a>(time:Number, name:String = "", parameters:Object = null):Object</div>
<div class="summaryTableDescription">
   Adds an ActionScript cue point.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#addEventListener()">addEventListener</a>(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void</div>
<div class="summaryTableDescription">  </div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#auditSize()">auditSize</a>():void</div>
<div class="summaryTableDescription">  
   Attempts loading just enough of the content to accurately determine the <code>bytesTotal</code> 
   in order to improve the accuracy of the <code>progress</code> property.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#cancel()">cancel</a>():void</div>
<div class="summaryTableDescription"> 
   If the loader is currently loading (<code>status</code> is <code>LoaderStatus.LOADING</code>), it will be canceled 
   immediately and its status will change to <code>LoaderStatus.READY</code>.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#dispose()">dispose</a>(flushContent:Boolean = false):void</div>
<div class="summaryTableDescription"> 
   Disposes of the loader and releases it internally for garbage collection.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#getCuePointTime()">getCuePointTime</a>(name:String):Number</div>
<div class="summaryTableDescription">
   Finds a cue point by name and returns its corresponding time (where it is positioned in the video).</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#gotoVideoCuePoint()">gotoVideoCuePoint</a>(name:String, forcePlay:Boolean = false, skipCuePoints:Boolean = true):Number</div>
<div class="summaryTableDescription">
   Attempts to jump to a certain cue point (either a cue point that was embedded in the
   video itself when it was encoded or a cue point that was added via <code>addASCuePoint()</code>).</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#gotoVideoTime()">gotoVideoTime</a>(time:Number, forcePlay:Boolean = false, skipCuePoints:Boolean = true):Number</div>
<div class="summaryTableDescription"> 
   Attempts to jump to a certain time in the video.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#load()">load</a>(flushContent:Boolean = false):void</div>
<div class="summaryTableDescription">
   Loads the loader's content, optionally flushing any previously loaded content first.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#pause()">pause</a>():void</div>
<div class="summaryTableDescription"> Pauses the loader immediately.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#pauseVideo()">pauseVideo</a>(event:Event = null):void</div>
<div class="summaryTableDescription"> 
   Pauses playback of the video.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#playVideo()">playVideo</a>(event:Event = null):void</div>
<div class="summaryTableDescription"> 
   Plays the video (if the buffer isn't full yet, playback will wait until the buffer is full).</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#prioritize()">prioritize</a>(loadNow:Boolean = true):void</div>
<div class="summaryTableDescription"> 
   Immediately prioritizes the loader inside any LoaderMax instances that contain it,
   forcing it to the top position in their queue and optionally calls <code>load()</code>
   immediately as well.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#removeASCuePoint()">removeASCuePoint</a>(timeNameOrCuePoint:*):Object</div>
<div class="summaryTableDescription">
   Removes an ActionScript cue point that was added with <code>addASCuePoint()</code>.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#resume()">resume</a>():void</div>
<div class="summaryTableDescription"> Unpauses the loader and resumes loading immediately.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#toString()">toString</a>():String</div>
<div class="summaryTableDescription"> Returns information about the loader, like its type, its <code>name</code>, and its <code>url</code> (if it has one).</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="hideInheritedMethod">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#unload()">unload</a>():void</div>
<div class="summaryTableDescription"> 
   Removes any content that was loaded and sets <code>bytesLoaded</code> back to zero.</div>
</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
</table>
</div>
<a name="protectedMethodSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Protected Methods</div>
<table id="summaryTableProtectedMethod" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Method</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#_seek()">_seek</a>(time:Number):void</div>
<div class="summaryTableDescription"></div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
</table>
</div>
<a name="eventSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Events</div>
<div class="showHideLinks">
<div class="hideInheritedEvent" id="hideInheritedEvent">
<a onclick="javascript:setInheritedVisible(false,'Event');" href="#eventSummary" class="showHideLink"><img src="../../../images/expanded.gif" class="showHideLinkImage"> Hide Inherited Events</a>
</div>
<div class="showInheritedEvent" id="showInheritedEvent">
<a onclick="javascript:setInheritedVisible(true,'Event');" href="#eventSummary" class="showHideLink"><img src="../../../images/collapsed.gif" class="showHideLinkImage"> Show Inherited Events</a>
</div>
</div>
<table id="summaryTableEvent" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Event</th><th>Summary</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="hideInheritedEvent">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#event:cancel">cancel</a>
</div>
</td><td class="summaryTableDescription summaryTableCol"> Dispatched when the loader is canceled while loading which can occur either because of a failure or when a sibling loader is prioritized in a LoaderMax queue.</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="hideInheritedEvent">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#event:complete">complete</a>
</div>
</td><td class="summaryTableDescription summaryTableCol"> Dispatched when the loader completes.</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="hideInheritedEvent">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#event:error">error</a>
</div>
</td><td class="summaryTableDescription summaryTableCol"> Dispatched when the loader experiences some type of error, like a SECURITY_ERROR or IO_ERROR.</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="hideInheritedEvent">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#event:fail">fail</a>
</div>
</td><td class="summaryTableDescription summaryTableCol"> Dispatched when the loader fails.</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:httpStatus">httpStatus</a>
</div>
</td><td class="summaryTableDescription summaryTableCol"> Dispatched when the loader's <code>httpStatus</code> value changes.</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedEvent">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderItem.html#event:ioError">ioError</a>
</div>
</td><td class="summaryTableDescription summaryTableCol"> Dispatched when the loader experiences an IO_ERROR while loading or auditing its size.</td><td class="summaryTableOwnerCol"><a href="core/LoaderItem.html">LoaderItem</a></td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="#event:netStatus">netStatus</a>
</div>
</td><td class="summaryTableDescription summaryTableCol"> Dispatched when the <code>netStream</code> dispatches a NET_STATUS event.</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="hideInheritedEvent">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#event:open">open</a>
</div>
</td><td class="summaryTableDescription summaryTableCol"> Dispatched when the loader starts loading.</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="hideInheritedEvent">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#event:progress">progress</a>
</div>
</td><td class="summaryTableDescription summaryTableCol"> Dispatched each time the <code>bytesLoaded</code> value changes while loading (indicating progress).</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
<tr class="hideInheritedEvent">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol"><img class="inheritedSummaryImage" title="Inherited" alt="Inherited" src="../../../images/inheritedSummary.gif"></td><td class="summaryTableSignatureCol">
<div class="summarySignature">
<a class="signatureLink" href="core/LoaderCore.html#event:unload">unload</a>
</div>
</td><td class="summaryTableDescription summaryTableCol"> Dispatched when the loader unloads (which happens when either <code>unload()</code> or <code>dispose(true)</code> is called or if a loader is canceled while in the process of loading).</td><td class="summaryTableOwnerCol"><a href="core/LoaderCore.html">LoaderCore</a></td>
</tr>
</table>
</div>
<a name="constantSummary"></a>
<div class="summarySection">
<div class="summaryTableTitle">Public Constants</div>
<table id="summaryTableConstant" class="summaryTable " cellpadding="3" cellspacing="0">
<tr>
<th>&nbsp;</th><th colspan="2">Constant</th><th class="summaryTableOwnerCol">Defined&nbsp;by</th>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#PLAY_PROGRESS">PLAY_PROGRESS</a> : String = "playProgress"<div class="summaryTableDescription">[static] Event type constant for when the playback progresses (only dispatched when the video is playing).</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#VIDEO_BUFFER_EMPTY">VIDEO_BUFFER_EMPTY</a> : String = "videoBufferEmpty"<div class="summaryTableDescription">[static] Event type constant for when the video's buffer is empty.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#VIDEO_BUFFER_FULL">VIDEO_BUFFER_FULL</a> : String = "videoBufferFull"<div class="summaryTableDescription">[static] Event type constant for when the video's buffer is full.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#VIDEO_COMPLETE">VIDEO_COMPLETE</a> : String = "videoComplete"<div class="summaryTableDescription">[static] Event type constant for when the video completes.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#VIDEO_CUE_POINT">VIDEO_CUE_POINT</a> : String = "videoCuePoint"<div class="summaryTableDescription">[static] Event type constant for when the video reaches a cue point in the playback of the NetStream.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#VIDEO_PAUSE">VIDEO_PAUSE</a> : String = "videoPause"<div class="summaryTableDescription">[static] Event type constant for when the video is paused.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
<tr class="">
<td class="summaryTablePaddingCol">&nbsp;</td><td class="summaryTableInheritanceCol">&nbsp;</td><td class="summaryTableSignatureCol"><a class="signatureLink" href="#VIDEO_PLAY">VIDEO_PLAY</a> : String = "videoPlay"<div class="summaryTableDescription">[static] Event type constant for when the video begins or resumes playing.</div>
</td><td class="summaryTableOwnerCol">VideoLoader</td>
</tr>
</table>
</div>
<script type="text/javascript" language="javascript">
<!--
showHideInherited();
--></script>
<div class="MainContent">
<a name="propertyDetail"></a>
<div class="detailSectionHeader">Property detail</div>
<a name="autoAdjustBuffer"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">autoAdjustBuffer</td><td class="detailHeaderType">property</td>
</tr>
</table>
<div class="detailBody">
<code>public var autoAdjustBuffer:Boolean</code><p> If the buffer becomes empty during playback and <code>autoAdjustBuffer</code> is <code>true</code> (the default), it will automatically attempt to adjust the NetStream's <code>bufferTime</code> based on the rate at which the video has been loading, estimating what it needs to be in order to play the rest of the video without emptying the buffer again. This can prevent the annoying problem of video playback start/stopping/starting/stopping on a system tht doesn't have enough bandwidth to adequately buffer the video. You may also set the <code>bufferTime</code> in the constructor's <code>vars</code> parameter to set the initial value. </p></div>
<a name="autoDetachNetStream"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">autoDetachNetStream</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>autoDetachNetStream:Boolean</code>&nbsp;&nbsp;[read-write]<p> If <code>true</code> (the default), the NetStream will only be attached to the Video object (the <code>rawContent</code>) when it is in the display list (on the stage). This conserves memory but it can cause a very brief rendering delay when the content is initially added to the stage (often imperceptible). Also, if you add it to the stage when the videoTime is <i>after</i> its last encoded keyframe, it will render at that last keyframe. </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get autoDetachNetStream():Boolean</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set autoDetachNetStream(value:Boolean):void</code>
<br>
</div>
<a name="bufferMode"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">bufferMode</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>bufferMode:Boolean</code>&nbsp;&nbsp;[read-write]<p> 
   When <code>bufferMode</code> is <code>true</code>, the loader will report its progress only in terms of the 
   video's buffer instead of its overall file loading progress which has the following effects:
   <ul>
     <li>The <code>bytesTotal</code> will be calculated based on the NetStream's <code>duration</code>, <code>bufferLength</code>, and <code>bufferTime</code> meaning it may fluctuate in order to accurately reflect the overall <code>progress</code> ratio.</li> 
     <li>Its <code>COMPLETE</code> event will be dispatched as soon as the buffer is full, so if the VideoLoader is nested in a LoaderMax, the LoaderMax will move on to the next loader in its queue at that point. However, the VideoLoader's NetStream will continue to load in the background, using up bandwidth.</li>
   </ul>
   
   This can be very convenient if, for example, you want to display loading progress based on the video's buffer
   or if you want to load a series of loaders in a LoaderMax and have it fire its <code>COMPLETE</code> event
   when the buffer is full (as opposed to waiting for the entire video to load). 
   </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get bufferMode():Boolean</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set bufferMode(value:Boolean):void</code>
<br>
</div>
<a name="bufferProgress"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">bufferProgress</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>bufferProgress:Number</code>&nbsp;&nbsp;[read-only]<p> A value between 0 and 1 describing the progress of the buffer (0 = not buffered at all, 0.5 = halfway buffered, and 1 = fully buffered). The buffer progress is in relation to the <code>bufferTime</code> which is 5 seconds by default or you can pass a custom value in through the <code>vars</code> parameter in the constructor like <code>{bufferTime:20}</code>. </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get bufferProgress():Number</code>
<br>
</div>
<a name="content"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">content</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>content:*</code>&nbsp;&nbsp;[read-only]<p> A ContentDisplay (a Sprite) that contains a Video object to which the NetStream is attached. This ContentDisplay Sprite can be accessed immediately; you do not need to wait for the video to load. </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get content():*</code>
<br>
</div>
<a name="duration"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">duration</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>duration:Number</code>&nbsp;&nbsp;[read-only]<p> The duration (in seconds) of the video. This value is only accurate AFTER the metaData has been received and the <code>INIT</code> event has been dispatched. </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get duration():Number</code>
<br>
</div>
<a name="metaData"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">metaData</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public var metaData:Object</code><p> The metaData that was received from the video (contains information about its width, height, frame rate, etc.). See Adobe's docs for information about a NetStream's onMetaData callback. </p></div>
<a name="netStream"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">netStream</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>netStream:NetStream</code>&nbsp;&nbsp;[read-only]<p> The <code>NetStream</code> object used to load the video </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get netStream():NetStream</code>
<br>
</div>
<a name="playProgress"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">playProgress</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>playProgress:Number</code>&nbsp;&nbsp;[read-write]<p> A value between 0 and 1 describing the playback progress where 0 means the virtual playhead is at the very beginning of the video, 0.5 means it is at the halfway point and 1 means it is at the end of the video. </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get playProgress():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set playProgress(value:Number):void</code>
<br>
</div>
<a name="rawContent"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">rawContent</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>rawContent:Video</code>&nbsp;&nbsp;[read-only]<p> The <code>Video</code> object to which the NetStream was attached (automatically created by VideoLoader internally) </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get rawContent():Video</code>
<br>
</div>
<a name="stageVideo"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">stageVideo</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>stageVideo:Object</code>&nbsp;&nbsp;[read-write]<p> By default, the NetStream gets attached to a <code>Video</code> object, but if you want to use StageVideo in Flash, you can define the <code>stageVideo</code> object and VideoLoader will attach its NetStream to that StageVideo instance instead of the regular Video instance (which is the <code>rawContent</code>). Please read Adobe's docs regarding StageVideo to understand the tradeoffs and limitations. <strong>Note:</strong> the data type is <code>Object</code> instead of <code>StageVideo</code> in order to make VideoLoader compatible with Flash Player 9 and 10. Otherwise, you wouldn't be able to publish to those players because StageVideo was introduced in a later version. </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get stageVideo():Object</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set stageVideo(value:Object):void</code>
<br>
</div>
<a name="videoPaused"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">videoPaused</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>videoPaused:Boolean</code>&nbsp;&nbsp;[read-write]<p> The playback status of the video: <code>true</code> if the video's playback is paused, <code>false</code> if it isn't. </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get videoPaused():Boolean</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set videoPaused(value:Boolean):void</code>
<br>
</div>
<a name="videoTime"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">videoTime</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>videoTime:Number</code>&nbsp;&nbsp;[read-write]<p> The time (in seconds) at which the virtual playhead is positioned on the video. For example, if the virtual playhead is currently at the 3-second position (3 seconds from the beginning), this value would be 3. </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get videoTime():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set videoTime(value:Number):void</code>
<br>
</div>
<a name="volume"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">volume</td><td class="detailHeaderType">property</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>volume:Number</code>&nbsp;&nbsp;[read-write]<p> The volume of the video (a value between 0 and 1). </p><span class="label">Implementation</span>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function get volume():Number</code>
<br>
<code>&nbsp;&nbsp;&nbsp;&nbsp;public function set volume(value:Number):void</code>
<br>
</div>
<a name="constructorDetail"></a>
<div class="detailSectionHeader">Constructor detail</div>
<a name="VideoLoader()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">VideoLoader</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">constructor</td>
</tr>
</table>
<div class="detailBody">
<code>public function VideoLoader(urlOrRequest:*, vars:Object = null)</code><p>
   Constructor
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">urlOrRequest</span>:*</code> &mdash; The url (<code>String</code>) or <code>URLRequest</code> from which the loader should get its content.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">vars</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; An object containing optional configuration details. For example: <code>new VideoLoader("video/video.flv", {name:"myVideo", onComplete:completeHandler, onProgress:progressHandler})</code>.<br /><br />
   
   The following special properties can be passed into the constructor via the <code>vars</code> parameter
   which can be either a generic object or a <code><a href="data/VideoLoaderVars.html">VideoLoaderVars</a></code> object:<br />
   <ul>
     <li><strong> name : String</strong> - A name that is used to identify the VideoLoader instance. This name can be fed to the <code>LoaderMax.getLoader()</code> or <code>LoaderMax.getContent()</code> methods or traced at any time. Each loader's name should be unique. If you don't define one, a unique name will be created automatically, like "loader21".</li>
     <li><strong> bufferTime : Number</strong> - The amount of time (in seconds) that should be buffered before the video can begin playing (set <code>autoPlay</code> to <code>false</code> to pause the video initially).</li>
     <li><strong> autoPlay : Boolean</strong> - By default, the video will begin playing as soon as it has been adequately buffered, but to prevent it from playing initially, set <code>autoPlay</code> to <code>false</code>.</li>
     <li><strong> smoothing : Boolean</strong> - When <code>smoothing</code> is <code>true</code> (the default), smoothing will be enabled for the video which typically leads to better scaling results.</li>
     <li><strong> container : DisplayObjectContainer</strong> - A DisplayObjectContainer into which the <code>ContentDisplay</code> should be added immediately.</li>
     <li><strong> width : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>width</code> property (applied before rotation, scaleX, and scaleY).</li>
     <li><strong> height : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>height</code> property (applied before rotation, scaleX, and scaleY).</li>
     <li><strong> centerRegistration : Boolean </strong> - if <code>true</code>, the registration point will be placed in the center of the <code>ContentDisplay</code> which can be useful if, for example, you want to animate its scale and have it grow/shrink from its center.</li>
     <li><strong> scaleMode : String </strong> - When a <code>width</code> and <code>height</code> are defined, the <code>scaleMode</code> controls how the video will be scaled to fit the area. The following values are recognized (you may use the <code>com.greensock.layout.ScaleMode</code> constants if you prefer):
      <ul>
       <li><code>"stretch"</code> (the default) - The video will fill the width/height exactly.</li>
       <li><code>"proportionalInside"</code> - The video will be scaled proportionally to fit inside the area defined by the width/height</li>
       <li><code>"proportionalOutside"</code> - The video will be scaled proportionally to completely fill the area, allowing portions of it to exceed the bounds defined by the width/height.</li>
       <li><code>"widthOnly"</code> - Only the width of the video will be adjusted to fit.</li>
       <li><code>"heightOnly"</code> - Only the height of the video will be adjusted to fit.</li>
       <li><code>"none"</code> - No scaling of the video will occur.</li>
      </ul></li>
     <li><strong> hAlign : String </strong> - When a <code>width</code> and <code>height</code> are defined, the <code>hAlign</code> determines how the video is horizontally aligned within that area. The following values are recognized (you may use the <code>com.greensock.layout.AlignMode</code> constants if you prefer):
      <ul>
       <li><code>"center"</code> (the default) - The video will be centered horizontally in the area</li>
       <li><code>"left"</code> - The video will be aligned with the left side of the area</li>
       <li><code>"right"</code> - The video will be aligned with the right side of the area</li>
      </ul></li>
     <li><strong> vAlign : String </strong> - When a <code>width</code> and <code>height</code> are defined, the <code>vAlign</code> determines how the video is vertically aligned within that area. The following values are recognized (you may use the <code>com.greensock.layout.AlignMode</code> constants if you prefer):
      <ul>
       <li><code>"center"</code> (the default) - The video will be centered vertically in the area</li>
       <li><code>"top"</code> - The video will be aligned with the top of the area</li>
       <li><code>"bottom"</code> - The video will be aligned with the bottom of the area</li>
      </ul></li>
     <li><strong> crop : Boolean</strong> - When a <code>width</code> and <code>height</code> are defined, setting <code>crop</code> to <code>true</code> will cause the video to be cropped within that area (by applying a <code>scrollRect</code> for maximum performance). This is typically useful when the <code>scaleMode</code> is <code>"proportionalOutside"</code> or <code>"none"</code> so that any parts of the video that exceed the dimensions defined by <code>width</code> and <code>height</code> are visually chopped off. Use the <code>hAlign</code> and <code>vAlign</code> special properties to control the vertical and horizontal alignment within the cropped area.</li>
     <li><strong> x : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>x</code> property (for positioning on the stage).</li>
     <li><strong> y : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>y</code> property (for positioning on the stage).</li>
     <li><strong> scaleX : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>scaleX</code> property.</li>
     <li><strong> scaleY : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>scaleY</code> property.</li>
     <li><strong> rotation : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>rotation</code> property.</li>
     <li><strong> alpha : Number</strong> - Sets the <code>ContentDisplay</code>'s <code>alpha</code> property.</li>
     <li><strong> visible : Boolean</strong> - Sets the <code>ContentDisplay</code>'s <code>visible</code> property.</li>
     <li><strong> blendMode : String</strong> - Sets the <code>ContentDisplay</code>'s <code>blendMode</code> property.</li>
     <li><strong> bgColor : uint </strong> - When a <code>width</code> and <code>height</code> are defined, a rectangle will be drawn inside the <code>ContentDisplay</code> immediately in order to ease the development process. It is transparent by default, but you may define a <code>bgAlpha</code> if you prefer.</li>
     <li><strong> bgAlpha : Number </strong> - Controls the alpha of the rectangle that is drawn when a <code>width</code> and <code>height</code> are defined.</li>
     <li><strong> volume : Number</strong> - A value between 0 and 1 indicating the volume at which the video should play (default is 1).</li>
     <li><strong> repeat : int</strong> - Number of times that the video should repeat. To repeat indefinitely, use -1. Default is 0.</li>
     <li><strong> stageVideo : StageVideo</strong> - By default, the NetStream gets attached to a <code>Video</code> object, but if you want to use StageVideo in Flash, you can define the <code>stageVideo</code> property and VideoLoader will attach its NetStream to that StageVideo instance instead of the regular Video instance (which is the <code>rawContent</code>). Please read Adobe's docs regarding StageVideo to understand the benefits, tradeoffs and limitations.</li>  
     <li><strong> checkPolicyFile : Boolean</strong> - If <code>true</code>, the VideoLoader will check for a crossdomain.xml file on the remote host (only useful when loading videos from other domains - see Adobe's docs for details about NetStream's <code>checkPolicyFile</code> property). </li>
     <li><strong> estimatedDuration : Number</strong> - Estimated duration of the video in seconds. VideoLoader will only use this value until it receives the necessary metaData from the video in order to accurately determine the video's duration. You do not need to specify an <code>estimatedDuration</code>, but doing so can help make the playProgress and some other values more accurate (until the metaData has loaded). It can also make the <code>progress/bytesLoaded/bytesTotal</code> more accurate when a <code>estimatedDuration</code> is defined, particularly in <code>bufferMode</code>.</li>
     <li><strong> deblocking : int</strong> - Indicates the type of filter applied to decoded video as part of post-processing. The default value is 0, which lets the video compressor apply a deblocking filter as needed. See Adobe's <code>flash.media.Video</code> class docs for details.</li>
     <li><strong> bufferMode : Boolean </strong> - When <code>true</code>, the loader will report its progress only in terms of the video's buffer which can be very convenient if, for example, you want to display loading progress for the video's buffer or tuck it into a LoaderMax with other loaders and allow the LoaderMax to dispatch its <code>COMPLETE</code> event when the buffer is full instead of waiting for the whole file to download. When <code>bufferMode</code> is <code>true</code>, the VideoLoader will dispatch its <code>COMPLETE</code> event when the buffer is full as opposed to waiting for the entire video to load. You can toggle the <code>bufferMode</code> anytime. Please read the full <code>bufferMode</code> property ASDoc description below for details about how it affects things like <code>bytesTotal</code>.</li>
     <li><strong> autoAdjustBuffer : Boolean </strong> If the buffer becomes empty during playback and <code>autoAdjustBuffer</code> is <code>true</code> (the default), it will automatically attempt to adjust the NetStream's <code>bufferTime</code> based on the rate at which the video has been loading, estimating what it needs to be in order to play the rest of the video without emptying the buffer again. This can prevent the annoying problem of video playback start/stopping/starting/stopping on a system tht doesn't have enough bandwidth to adequately buffer the video. You may also set the <code>bufferTime</code> in the constructor's <code>vars</code> parameter to set the initial value.</li>
     <li><strong> autoDetachNetStream : Boolean</strong> - If <code>true</code>, the NetStream will only be attached to the Video object (the <code>rawContent</code>) when it is in the display list (on the stage). This conserves memory but it can cause a very brief rendering delay when the content is initially added to the stage (often imperceptible). Also, if you add it to the stage when the <code>videoTime</code> is <i>after</i> its last encoded keyframe, it will render at that last keyframe.</li>
     <li><strong> alternateURL : String</strong> - If you define an <code>alternateURL</code>, the loader will initially try to load from its original <code>url</code> and if it fails, it will automatically (and permanently) change the loader's <code>url</code> to the <code>alternateURL</code> and try again. Think of it as a fallback or backup <code>url</code>. It is perfectly acceptable to use the same <code>alternateURL</code> for multiple loaders (maybe a default image for various ImageLoaders for example).</li>
     <li><strong> noCache : Boolean</strong> - If <code>noCache</code> is <code>true</code>, a "gsCacheBusterID" parameter will be appended to the url with a random set of numbers to prevent caching (don't worry, this info is ignored when you <code>getLoader()</code> or <code>getContent()</code> by url and when you're running locally)</li>
     <li><strong> estimatedBytes : uint</strong> - Initially, the loader's <code>bytesTotal</code> is set to the <code>estimatedBytes</code> value (or <code>LoaderMax.defaultEstimatedBytes</code> if one isn't defined). Then, when the loader begins loading and it can accurately determine the bytesTotal, it will do so. Setting <code>estimatedBytes</code> is optional, but the more accurate the value, the more accurate your loaders' overall progress will be initially. If the loader will be inserted into a LoaderMax instance (for queue management), its <code>auditSize</code> feature can attempt to automatically determine the <code>bytesTotal</code> at runtime (there is a slight performance penalty for this, however - see LoaderMax's documentation for details).</li>
     <li><strong> requireWithRoot : DisplayObject</strong> - LoaderMax supports <i>subloading</i>, where an object can be factored into a parent's loading progress. If you want LoaderMax to require this VideoLoader as part of its parent SWFLoader's progress, you must set the <code>requireWithRoot</code> property to your swf's <code>root</code>. For example, <code>var loader:VideoLoader = new VideoLoader("myScript.php", {name:"textData", requireWithRoot:this.root});</code></li>
     <li><strong> allowMalformedURL : Boolean</strong> - Normally, the URL will be parsed and any variables in the query string (like "?name=test&amp;state=il&amp;gender=m") will be placed into a URLVariables object which is added to the URLRequest. This avoids a few bugs in Flash, but if you need to keep the entire URL intact (no parsing into URLVariables), set <code>allowMalformedURL:true</code>. For example, if your URL has duplicate variables in the query string like <code>http://www.greensock.com/?c=S&amp;c=SE&amp;c=SW</code>, it is technically considered a malformed URL and a URLVariables object can't properly contain all the duplicates, so in this case you'd want to set <code>allowMalformedURL</code> to <code>true</code>.</li>
     <li><strong> autoDispose : Boolean</strong> - When <code>autoDispose</code> is <code>true</code>, the loader will be disposed immediately after it completes (it calls the <code>dispose()</code> method internally after dispatching its <code>COMPLETE</code> event). This will remove any listeners that were defined in the vars object (like onComplete, onProgress, onError, onInit). Once a loader is disposed, it can no longer be found with <code>LoaderMax.getLoader()</code> or <code>LoaderMax.getContent()</code> - it is essentially destroyed but its content is not unloaded (you must call <code>unload()</code> or <code>dispose(true)</code> to unload its content). The default <code>autoDispose</code> value is <code>false</code>.
     
     <br /><br />----EVENT HANDLER SHORTCUTS----</li>
     <li><strong> onOpen : Function</strong> - A handler function for <code>LoaderEvent.OPEN</code> events which are dispatched when the loader begins loading. Make sure your onOpen function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>).</li>
     <li><strong> onInit : Function</strong> - A handler function for <code>Event.INIT</code> events which will be called when the video's metaData has been received and the video is placed into the <code>ContentDisplay</code>. The <code>INIT</code> event can be dispatched more than once if the NetStream receives metaData more than once (which occasionally happens, particularly with F4V files - the first time often doesn't include the cuePoints). Make sure your <code>onInit</code> function accepts a single parameter of type <code>Event</code> (flash.events.Event).</li>
     <li><strong> onProgress : Function</strong> - A handler function for <code>LoaderEvent.PROGRESS</code> events which are dispatched whenever the <code>bytesLoaded</code> changes. Make sure your onProgress function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>). You can use the LoaderEvent's <code>target.progress</code> to get the loader's progress value or use its <code>target.bytesLoaded</code> and <code>target.bytesTotal</code>.</li>
     <li><strong> onComplete : Function</strong> - A handler function for <code>LoaderEvent.COMPLETE</code> events which are dispatched when the loader has finished loading successfully. Make sure your onComplete function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>).</li>
     <li><strong> onCancel : Function</strong> - A handler function for <code>LoaderEvent.CANCEL</code> events which are dispatched when loading is aborted due to either a failure or because another loader was prioritized or <code>cancel()</code> was manually called. Make sure your onCancel function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>).</li>
     <li><strong> onError : Function</strong> - A handler function for <code>LoaderEvent.ERROR</code> events which are dispatched whenever the loader experiences an error (typically an IO_ERROR). An error doesn't necessarily mean the loader failed, however - to listen for when a loader fails, use the <code>onFail</code> special property. Make sure your onError function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>).</li>
     <li><strong> onFail : Function</strong> - A handler function for <code>LoaderEvent.FAIL</code> events which are dispatched whenever the loader fails and its <code>status</code> changes to <code>LoaderStatus.FAILED</code>. Make sure your onFail function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>).</li>
     <li><strong> onIOError : Function</strong> - A handler function for <code>LoaderEvent.IO_ERROR</code> events which will also call the onError handler, so you can use that as more of a catch-all whereas <code>onIOError</code> is specifically for LoaderEvent.IO_ERROR events. Make sure your onIOError function accepts a single parameter of type <code>LoaderEvent</code> (<code>com.greensock.events.LoaderEvent</code>).</li>
   </ul>
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="data/VideoLoaderVars.html" target="">com.greensock.loading.data.VideoLoaderVars</a>
</div>
</div>
<a name="methodDetail"></a>
<div class="detailSectionHeader">Method detail</div>
<a name="_seek()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">_seek</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td>
</tr>
</table>
<div class="detailBody">
<code>protected function _seek(time:Number):void</code><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">time</span>:Number</code></td>
</tr>
</table>
</div>
<a name="addASCuePoint()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addASCuePoint</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function addASCuePoint(time:Number, name:String = "", parameters:Object = null):Object</code><p>
   Adds an ActionScript cue point. Cue points are only triggered when the video is playing and passes
   the cue point's position in the video (in the forwards direction - they are not triggered when you skip
   to a previous time in the video with <code>gotoVideoTime()</code>). <br /><br />
   
   For example, to add a cue point named "coolPart" at the 5-second point of the video, do:<br /><br /><code>
   
   myVideoLoader.addASCuePoint(5, "coolPart", {message:"This is a cool part.", id:5}); <br />
   myVideoLoader.addEventListener(VideoLoader.VIDEO_CUE_POINT, cuePointHandler); <br />
   function cuePointHandler(event:LoaderEvent):void { <br />
       trace("hit cue point " + event.data.name + ", message: " + event.data.parameters.message); <br />
   }</code>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">time</span>:Number</code> &mdash; The time (in seconds) at which the cue point should be placed in the video. 
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code> (default = "<code></code>")<code></code> &mdash; The name of the cue point. It is acceptable to have multiple cue points with the same name.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">parameters</span>:Object</code> (default = <code>null</code>)<code></code> &mdash; An object containing any data that you want associated with the cue point. For example, <code>{message:"descriptive text", id:5}</code>. This data can be retrieved in the VIDEO_CUE_POINT handler via the LoaderEvent's <code>data</code> property like <code>event.data.parameters</code>
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Object</code> &mdash; The cue point that was added
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../loading/VideoLoader.html#removeASCuePoint()" target="">removeASCuePoint()</a>
<br>
<a href="../loading/VideoLoader.html#gotoVideoCuePoint()" target="">gotoVideoCuePoint()</a>
<br>
<a href="../loading/VideoLoader.html#getCuePointTime()" target="">getCuePointTime()</a>
</div>
</div>
<a name="addEventListener()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">addEventListener</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public override function addEventListener(type:String, listener:Function, useCapture:Boolean = false, priority:int = 0, useWeakReference:Boolean = false):void</code><p>  </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">type</span>:String</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">listener</span>:Function</code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">useCapture</span>:Boolean</code> (default = <code>false</code>)<code></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">priority</span>:int</code> (default = <code>0</code>)<code></code></td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">useWeakReference</span>:Boolean</code> (default = <code>false</code>)<code></code></td>
</tr>
</table>
</div>
<a name="auditSize()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">auditSize</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public override function auditSize():void</code><p>  
   Attempts loading just enough of the content to accurately determine the <code>bytesTotal</code> 
   in order to improve the accuracy of the <code>progress</code> property. Once the 
   <code>bytesTotal</code> has been determined or the <code>auditSize()</code> attempt fails due
   to an error (typically IO_ERROR or SECURITY_ERROR), the <code>auditedSize</code> property will be 
   set to <code>true</code>. Auditing the size opens a URLStream that will be closed 
   as soon as a response is received.
   </p></div>
<a name="getCuePointTime()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">getCuePointTime</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function getCuePointTime(name:String):Number</code><p>
   Finds a cue point by name and returns its corresponding time (where it is positioned in the video). 
   All cue points will be included in the search (cue points embedded into the video when it was encoded
   as well as cue points that were added with <code>addASCuePoint()</code>).
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code> &mdash; The name of the cue point
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; The cue point's time (NaN if no cue point was found with the specified name)
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../loading/VideoLoader.html#addASCuePoint()" target="">addASCuePoint()</a>
<br>
<a href="../loading/VideoLoader.html#gotoVideoCuePoint()" target="">gotoVideoCuePoint()</a>
<br>
<a href="../loading/VideoLoader.html#gotoVideoTime()" target="">gotoVideoTime()</a>
</div>
</div>
<a name="gotoVideoCuePoint()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">gotoVideoCuePoint</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function gotoVideoCuePoint(name:String, forcePlay:Boolean = false, skipCuePoints:Boolean = true):Number</code><p>
   Attempts to jump to a certain cue point (either a cue point that was embedded in the
   video itself when it was encoded or a cue point that was added via <code>addASCuePoint()</code>). 
   If the video hasn't downloaded enough to get to the cue point or if there is no keyframe at that 
   point in the video, it will get as close as possible. For example, to jump to a cue point
   named "highlight1" and play from there:<br /><br /><code>
   
   loader.gotoVideoCuePoint("highlight1", true);<br /><br /></code>
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">name</span>:String</code> &mdash; The name of the cue point
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">forcePlay</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; If <code>true</code>, the video will resume playback immediately after seeking to the new position.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">skipCuePoints</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; If <code>true</code> (the default), any cue points that are positioned between the current videoTime and the destination cue point will be ignored when moving to the new videoTime. In other words, it is like a record player that has its needle picked up, moved, and dropped into a new position rather than dragging it across the record, triggering the various cue points (if any exist there). IMPORTANT: cue points are only triggered when the time advances in the forward direction; they are never triggered when rewinding or restarting. 
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code> &mdash; The cue point's time (NaN if the cue point wasn't found)
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../loading/VideoLoader.html#gotoVideoTime()" target="">gotoVideoTime()</a>
<br>
<a href="../loading/VideoLoader.html#addASCuePoint()" target="">addASCuePoint()</a>
<br>
<a href="../loading/VideoLoader.html#removeASCuePoint()" target="">removeASCuePoint()</a>
</div>
</div>
<a name="gotoVideoTime()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">gotoVideoTime</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function gotoVideoTime(time:Number, forcePlay:Boolean = false, skipCuePoints:Boolean = true):Number</code><p> 
   Attempts to jump to a certain time in the video. If the video hasn't downloaded enough to get to
   the new time or if there is no keyframe at that time value, it will get as close as possible.
   For example, to jump to exactly 3-seconds into the video and play from there:<br /><br /><code>
   
   loader.gotoVideoTime(3, true);<br /><br /></code>
   
   The VideoLoader's <code>videoTime</code> will immediately reflect the new time, but <code>PLAY_PROGRESS</code> 
   event won't be dispatched until the NetStream's <code>time</code> renders at that spot (which can take a frame or so).<br /><br />
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">time</span>:Number</code> &mdash; The time (in seconds, offset from the very beginning) at which to place the virtual playhead on the video.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">forcePlay</span>:Boolean</code> (default = <code>false</code>)<code></code> &mdash; If <code>true</code>, the video will resume playback immediately after seeking to the new position.
   </td>
</tr>
<tr>
<td class="paramSpacer">&nbsp;</td>
</tr>
<tr>
<td width="20px"></td><td><code><span class="label">skipCuePoints</span>:Boolean</code> (default = <code>true</code>)<code></code> &mdash; If <code>true</code> (the default), any cue points that are positioned between the current videoTime and the destination time (defined by the <code>time</code> parameter) will be ignored when moving to the new videoTime. In other words, it is like a record player that has its needle picked up, moved, and dropped into a new position rather than dragging it across the record, triggering the various cue points (if any exist there). IMPORTANT: cue points are only triggered when the time advances in the forward direction; they are never triggered when rewinding or restarting. 
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Number</code></td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../loading/VideoLoader.html#pauseVideo()" target="">pauseVideo()</a>
<br>
<a href="../loading/VideoLoader.html#playVideo()" target="">playVideo()</a>
<br>
<a href="../loading/VideoLoader.html#videoTime" target="">videoTime</a>
<br>
<a href="../loading/VideoLoader.html#playProgress" target="">playProgress</a>
</div>
</div>
<a name="pauseVideo()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">pauseVideo</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function pauseVideo(event:Event = null):void</code><p> 
   Pauses playback of the video. 
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">event</span>:Event</code> (default = <code>null</code>)<code></code> &mdash; An optional Event which simply makes it easier to use the method as a handler for mouse clicks or other events.
   
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../loading/VideoLoader.html#videoPaused" target="">videoPaused</a>
<br>
<a href="../loading/VideoLoader.html#gotoVideoTime()" target="">gotoVideoTime()</a>
<br>
<a href="../loading/VideoLoader.html#playVideo()" target="">playVideo()</a>
<br>
<a href="../loading/VideoLoader.html#videoTime" target="">videoTime</a>
<br>
<a href="../loading/VideoLoader.html#playProgress" target="">playProgress</a>
</div>
</div>
<a name="playVideo()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">playVideo</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function playVideo(event:Event = null):void</code><p> 
   Plays the video (if the buffer isn't full yet, playback will wait until the buffer is full).
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">event</span>:Event</code> (default = <code>null</code>)<code></code> &mdash; An optional Event which simply makes it easier to use the method as a handler for mouse clicks or other events.
   
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../loading/VideoLoader.html#videoPaused" target="">videoPaused</a>
<br>
<a href="../loading/VideoLoader.html#pauseVideo()" target="">pauseVideo()</a>
<br>
<a href="../loading/VideoLoader.html#gotoVideoTime()" target="">gotoVideoTime()</a>
<br>
<a href="../loading/VideoLoader.html#videoTime" target="">videoTime</a>
<br>
<a href="../loading/VideoLoader.html#playProgress" target="">playProgress</a>
</div>
</div>
<a name="removeASCuePoint()"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">removeASCuePoint</td><td class="detailHeaderParens">()</td><td class="detailHeaderType">method</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public function removeASCuePoint(timeNameOrCuePoint:*):Object</code><p>
   Removes an ActionScript cue point that was added with <code>addASCuePoint()</code>. If multiple ActionScript
   cue points match the search criteria, only one is removed. To remove all, call this function repeatedly in a 
   loop with the same parameters until it returns null. 
   
   </p><span class="label">Parameters</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20px"></td><td><code><span class="label">timeNameOrCuePoint</span>:*</code> &mdash; The time, name or cue point object that should be removed. The method removes the first cue point that matches the criteria. 
   </td>
</tr>
</table>
<p></p>
<span class="label">Returns</span>
<table border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="20"></td><td><code>Object</code> &mdash; The cue point that was removed (or <code>null</code> if none were found that match the criteria)
   </td>
</tr>
</table>
<p>
<span class="label">See also</span>
</p>
<div class="seeAlso">
<a href="../loading/VideoLoader.html#addASCuePoint()" target="">addASCuePoint()</a>
</div>
</div>
<div class="detailSectionHeader">Event detail</div>
<a name="event:httpStatus"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">httpStatus</td><td class="detailHeaderType">event&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href="../events/LoaderEvent.html"><code>com.greensock.events.LoaderEvent</code></a>
<br>
<p></p><p> Dispatched when the loader's <code>httpStatus</code> value changes. </p></div>
<a name="event:netStatus"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">netStatus</td><td class="detailHeaderType">event&nbsp;</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<span class="label">Event object type: </span><a href="../events/LoaderEvent.html"><code>com.greensock.events.LoaderEvent</code></a>
<br>
<p></p><p> Dispatched when the <code>netStream</code> dispatches a NET_STATUS event. </p></div>
<a name="constantDetail"></a>
<div class="detailSectionHeader">Constant detail</div>
<a name="PLAY_PROGRESS"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">PLAY_PROGRESS</td><td class="detailHeaderType">constant</td>
</tr>
</table>
<div class="detailBody">
<code>public static const PLAY_PROGRESS:String = "playProgress"</code><p> Event type constant for when the playback progresses (only dispatched when the video is playing). </p></div>
<a name="VIDEO_BUFFER_EMPTY"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">VIDEO_BUFFER_EMPTY</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const VIDEO_BUFFER_EMPTY:String = "videoBufferEmpty"</code><p> Event type constant for when the video's buffer is empty. </p></div>
<a name="VIDEO_BUFFER_FULL"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">VIDEO_BUFFER_FULL</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const VIDEO_BUFFER_FULL:String = "videoBufferFull"</code><p> Event type constant for when the video's buffer is full. </p></div>
<a name="VIDEO_COMPLETE"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">VIDEO_COMPLETE</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const VIDEO_COMPLETE:String = "videoComplete"</code><p> Event type constant for when the video completes. </p></div>
<a name="VIDEO_CUE_POINT"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">VIDEO_CUE_POINT</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const VIDEO_CUE_POINT:String = "videoCuePoint"</code><p> Event type constant for when the video reaches a cue point in the playback of the NetStream. </p></div>
<a name="VIDEO_PAUSE"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">VIDEO_PAUSE</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const VIDEO_PAUSE:String = "videoPause"</code><p> Event type constant for when the video is paused. </p></div>
<a name="VIDEO_PLAY"></a>
<table cellspacing="0" cellpadding="0" class="detailHeader">
<tr>
<td class="detailHeaderName">VIDEO_PLAY</td><td class="detailHeaderType">constant</td><td class="detailHeaderRule">&nbsp;</td>
</tr>
</table>
<div class="detailBody">
<code>public static const VIDEO_PLAY:String = "videoPlay"</code><p> Event type constant for when the video begins or resumes playing. If the buffer isn't full yet when VIDEO_PLAY is dispatched, the video will wait to visually begin playing until the buffer is full. So VIDEO_PLAY indicates when the NetStream received an instruction to play, not necessarily when it visually begins playing. </p></div>
<br>
<br>
<hr>
<br>
<p></p>
<center class="copyright"> 
</center>
</div>
</body>
</html>
<!-- -->
